package com.example.helloworld.view;

import android.graphics.Bitmap;

public class DragInfo {
	
	public static final int POINT_X =		0;
	public static final int POINT_Y =		1;

	public static final int SIZE_WIDTH =	0;
	public static final int SIZE_HEIGHT =	1;
	
	private Bitmap bitmap =		null;
	private int[] position =	{0, 0};

	public DragInfo(Bitmap bitmap, int x, int y) {
		this.bitmap =	bitmap;
		setPosition(x, y);
	}
	
	public Bitmap getBitmap() {
		return bitmap;
	}
	
	public void setBitmap(Bitmap bitmap) {
		this.bitmap = bitmap;
	}
	
	public int[] getPosition() {
		return position;
	}
	
	public int getX() {
		return position[POINT_X];
	}

	public int getY() {
		return position[POINT_Y];
	}
	
	public void setPosition(int[] position) {
		this.position = position;
	}
	
	public void setPosition(int x, int y) {
		position[POINT_X] =	x;
		position[POINT_Y] =	y;
	}
	
	public int getWidth() {
		return bitmap.getWidth();
	}

	public int getHeight() {
		return bitmap.getHeight();
	}
	
	public int getOffsetX() {
		return Math.round(getWidth() / 2F);
	}
	
	public int getOffsetY() {
		return Math.round(getHeight() / 2F);
	}
	
}
